package com.think.admin.web.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.think.admin.model.dto.role.RoleDTO;
import com.think.admin.model.param.role.RoleParam;
import com.think.admin.model.param.role.SetRoleResourceParam;
import com.think.admin.model.query.RoleQuery;
import com.think.common.param.UpdateBatchParam;
import com.think.common.web.service.ISuperService;
import com.think.dao.entity.Role;
import org.springframework.http.HttpEntity;

import java.util.List;

/**
 * <p>
 * 角色表 服务类
 * </p>
 *
 * @author xwj
 * @since 2019-04-08
 */
public interface IRoleService extends ISuperService<Role> {

    /** 
     * 查询
     *
     * @param page 
     * @param roleQuery
     * @return org.springframework.http.HttpEntity
     * @author xwj
     * @date 2019/4/25
     */ 
    HttpEntity selectPage(Page<RoleDTO> page, RoleQuery roleQuery);

    /**
     * 新增或者修改
     *
     * @param roleParam
     * @return org.springframework.http.HttpEntity
     * @author xwj
     * @date 2019/4/25
     */
    HttpEntity createOrUpdate(RoleParam roleParam);

    /**
     * 删除
     *
     * @param idList
     * @return org.springframework.http.HttpEntity
     * @author xwj
     * @date 2019/4/25
     */
    HttpEntity delete(List<String> idList);

    /**
     * 状态修改
     *
     * @param updateBatchParam
     * @return org.springframework.http.HttpEntity
     * @author xwj
     * @date 2019/4/25
     */
    HttpEntity updateState(UpdateBatchParam updateBatchParam);

    /**
     * 重建角色资源关联
     *
     * @param setRoleResourceParam
     * @return org.springframework.http.HttpEntity
     * @author xwj
     * @data 2019/5/5
     */
    HttpEntity setRoleResource(SetRoleResourceParam setRoleResourceParam);
}
